package com.zhenhao.xsq.ui.activity.door.module;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.door.InviteActivity;
import com.zhenhao.xsq.ui.activity.door.contract.InviteContract;
import com.zhenhao.xsq.ui.activity.door.presenter.InvitePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author William
 * @Package com.yxld.yxchuangxin.xsq.ui.activity.menjin
 * @Description: The moduele of MenJinInviteActivity, provide field for MenJinInviteActivity
 * @date 2020/06/01 11:20:51
 */
@Module
public class InviteModule {
    private final InviteContract.View mView;


    public InviteModule(InviteContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public InvitePresenter provideInvitePresenter(HttpAPIWrapper httpAPIWrapper, InviteActivity mActivity) {
        return new InvitePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public InviteActivity provideInviteActivity() {
        return (InviteActivity) mView;
    }
}